package com.hackerrank.contests.regexpractice1.challenges.ideidentifyingcomments;

import java.util.Scanner;

public class Solution {
	private static boolean mc = false;
	private static void process(String l) {
		if(mc) {
			int mlcei = l.indexOf("*/");
			if(mlcei < 0)
				System.out.println(l);
			else {
				System.out.println(l.substring(0, mlcei + 2));
				mc = false;
				process(l.substring(mlcei + 2));
			}
		} else {
			int slci = l.indexOf("//"), mlci = l.indexOf("/*");
			if(slci >= 0 && (mlci >= 0 && slci < mlci || mlci < 0))
				System.out.println(l.substring(slci));
			else if(mlci >= 0 && (slci >= 0 && slci > mlci || slci < 0)) {
				mc = true;
				String c = l.substring(mlci);
				int mlcei = c.indexOf("*/");
				if(mlcei < 2)
					System.out.println(c);
				else {
					System.out.println(c.substring(0, mlcei + 2));
					mc = false;
					process(l.substring(mlcei + 2));
				}
			}
		}
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while(in.hasNextLine())
			process(in.nextLine());
	}
}
